﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Reddit.EndpointRetriever;

namespace Reddit.Api
{
    public class ApiBase<T>
    {
        protected IEndpointRetriever<T> endpointRetriever { get; private set; }
        protected ApiBase(IEndpointRetriever<T> endpointRetriever) 
        {
            this.endpointRetriever = endpointRetriever;
        }

        protected T RetrieveEndpoint(Endpoint endpoint)
        {
            return this.endpointRetriever.RetrieveEndpoint(endpoint);
        }

    }
}
